<me:UITXT x:Class="WPFExcelReport.TXTITX"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTKON" 
                    xmlns:me="clr-namespace:WPFExcelReport"
                    x:Name="TV"         
                    Loaded="Window_Loaded"
     >
    <me:UITXT.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>  
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UITXT.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <WrapPanel  Grid.Row="0">
            <WrapPanel >
                <TextBlock Text="{Binding Source={Localization:Translate Word=备注}}"/> 
                <TextBlock Grid.Column="1" Text="{Binding TXTIPIND,Source={StaticResource ResourceKey=vwMaster}}" Width="Auto" />
            </WrapPanel>
            <WrapPanel>
                <Button  Click="EditCommand" Width="24" Height="20" Visibility="{Binding IsEdit, ElementName=TV, Converter={StaticResource nbv}}">
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Edit.png" />
                    </Button.Background>
                </Button>
                <Button    Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="24"  Visibility="{Binding IsEdit, ElementName=TV, Converter={StaticResource bv}}">
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
        </WrapPanel>
        <TXT:TXT Name="cTXT" Grid.Row="1" Grid.Column="0" 
                     INFO="{Binding INFO,ElementName=TV}"
                     PIND="{Binding PIND,ElementName=TV}" 
                     IsEdit="{Binding IsEdit,ElementName=TV}"
                    IsInfoOneLine="{Binding IsInfoOneLine,ElementName=TV}"
                    IsSaved="{Binding IsSaved,ElementName=TV}"
                    DEFTXT="{Binding DEFTXT,ElementName=TV}"/>
    </Grid>
</me:UITXT>
